import request from '@/utils/request'

const baseUrl = window.baseUrl

export function getPage(params) {
  return request({
    url: baseUrl + 'user/getPage',
    method: 'get',
    params
  })
}

export function get(params) {
  return request({
    url: baseUrl + 'user/get',
    method: 'get',
    params
  })
}

export function save(params) {
  return request.post(baseUrl + 'user/save', params)
}

export function update(params) {
  return request.post(baseUrl + 'user/edit', params)
}

export function del(params) {
  return request.post(baseUrl + 'user/delete', params)
}

export function enable(params) {
  return request.post(baseUrl + 'user/enable', params)
}

export function disable(params) {
  return request.post(baseUrl + 'user/disable', params)
}

export function resetPassword(params){
  return request.post(baseUrl + 'user/resetPassword', params)
}

export function changePassword(params){
  return request.post(baseUrl + 'user/changePassword', params)
}

export function getUser(params) {
  return request.post(baseUrl + 'user/getUser', params)
}  

export function getUploadUrl(){
  return baseUrl + 'user/upload';
}


